package com.csvc.business.cmdb.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csvc.business.cmdb.service.IOraSegmentService;
import com.csvc.repository.cmdb.domain.OraSegment;
import com.csvc.repository.cmdb.mapper.OraSegmentMapper;

/**
* <p>
    *  服务实现类
    * </p>
*
* @author vincent zou
* @since 2020-12-29
*/
@Service
    public class OraSegmentServiceImpl extends ServiceImpl<OraSegmentMapper, OraSegment> implements IOraSegmentService {
    @Override
    public boolean create(OraSegment oraSegment) {
    return super.save(oraSegment);
    }

    @Override
    public boolean remove(Long id) {
    return super.removeById(id);
    }

    @Override
    public boolean update(OraSegment oraSegment) {
    return super.updateById(oraSegment);
    }

    @Override
    public OraSegment get(Long id) {
    return super.getById(id);
    }

    @Override
    public IPage<OraSegment> page(int current, int size, OraSegment oraSegment) {
    Page<OraSegment> page = new Page<>(current, size);
    LambdaQueryWrapper<OraSegment> wrapper = new LambdaQueryWrapper<>();

    // TODO 查询
    // TODO 排序

    return super.page(page, wrapper);
    }
    }
